package model;

public class Item implements Comparable<Item>{
	
	public enum Category{FOOD, DRINK, COMBO};
	private String name;
	private double price;
	private String description;
	private Category category;
	private String imagePath;
	private int itemNumber;
	
	public int getItemNumber() {
		return itemNumber;
	}
	
	public void setItemNumber(int itemNumber) {
		this.itemNumber = itemNumber;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public double getPrice() {
		return price;
	}
	
	public void setPrice(double price) {
		this.price = price;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Category getCategory() {
		return category;
	}
	
	public void setCategory(Category category) {
		this.category = category;
	}
	
	public String getImagePath() {
		return imagePath;
	}
	
	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	@Override
	public int compareTo(Item otherItem) {
	
		return ( this.itemNumber - otherItem.getItemNumber() );
	}
	
	@Override
	public boolean equals(Object obj){
		
		if(obj instanceof Item){
			Item otherItem = (Item) obj;
			return(this.itemNumber == otherItem.getItemNumber());
		}
		return false;
	}
	
	@Override
	public int hashCode(){
		return (itemNumber + name).hashCode();
	}
}
